<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <style type="text/css">
    </style>
</head>
<body>

<selector id="select">
    <option value="1">a</option>
    <option value="2">b</option>
    <option class="hello" value="3">c</option>
    <option id="four" value="4">d</option>
</selector>
<input type="text" id="only" value="123">
<textarea name="textarea" cols="40" id="text" value="123">文本框中的内容</textarea>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
</script>
<script type="text/javascript">

    $(function () {
        /*var v = $("#only");
        alert(v.attr("value"));*/


        var v= $("#text").attr("text",'123666');
        alert(v)

        /*var v = $("selector");
        alert(v[0].value);*/

        /*var options = v.find(".hello");
        alert(options.value)*/
    })

    /*1.不允许对只读属性赋值*/
    /*var obj = {};
    Object.defineProperty(obj, "x", {value:0, writable:false});
    obj.x = 3.14;
    alert(obj);
    alert(obj.x);*/






</script>
</body>

</html>